GXSetColorSet
You can use theGXSetColorSet
function to replace the color values of a color set object.
void GXSetColorSet(gxColorSet target, gxColorSpace space, long count, const gxSetColor colors[]);
target
- A reference to the color set object whose color values you want to replace.
space
- The new color space for the color set referenced in the
target
parameter.count
- The number of color values in the
colors
array.colors
- The array of color values to assign to the color set.
DESCRIPTION
TheGXSetColorSet
function assigns the specified color space and color values to the target color set. IfgxNoSpace
is passed in thespace
parameter, the color space is unchanged. If thecolors
array isnil
and ifcount
is zero, the color set remains unchanged.SPECIAL CONSIDERATIONS
If you attempt to modify the color values of a color set object used by an onscreen view device, this function posts a colorSet_access_restricted warning.The current implementation of QuickDraw GX restricts the number of colors in a color set to a maximum of 65,535.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory colorSet_is_nil inconsistent_parameters (debugging version) count_is_less_than_zero (debugging version) colorSpace_out_of_range (debugging version) number_of_colors_exceeds_implementation_limit Warnings colorSet_access_restricted (debugging version) SEE ALSO
To retrieve the entire array of color values from a color set object, use theGXGetColorSet
function, described in the previous section. To retrieve some of the color values in a color set object, use theGXGetColorSetParts
function, described
in the next section. To replace some of the color values in a color set object, use theGXSetColorSetParts
function, described on page 4-76.The
gxSetColor
union is described on page 4-56.